package com.iw.core.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtil {

	public static String QR_PATH;
	public static String QR_URI;
	public static String QR_GOODS_PATH;
	public static String QR_GOODS_URI;
	public static String QR_BOX_PATH;
	public static String QR_BOX_URI;
	public static String QR_INTEGRAL_PATH;
	public static String QR_INTEGRAL_URI;
	public static String QR_PREFIX;
	public static String UPLOAD_DIR;
	static {
		Properties prop = new Properties();
		InputStream in = PropertiesUtil.class.getResourceAsStream("/jdbc.properties");
		try {
			prop.load(in);
			QR_PATH = prop.getProperty("qr.path").trim();
			QR_URI = prop.getProperty("qr.uri").trim();
			QR_BOX_PATH = QR_PATH + prop.getProperty("qr.box").trim();
			QR_BOX_URI = QR_URI + prop.getProperty("qr.box").trim();
			QR_GOODS_PATH = QR_PATH + prop.getProperty("qr.goods").trim();
			QR_GOODS_URI = QR_URI + prop.getProperty("qr.goods").trim();
			QR_INTEGRAL_PATH = QR_PATH + prop.getProperty("qr.integral").trim();
			QR_INTEGRAL_URI = QR_URI + prop.getProperty("qr.integral").trim();
			QR_PREFIX = prop.getProperty("qr.prefix").trim();
			UPLOAD_DIR = prop.getProperty("upload.dir").trim();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
